using System;
using System.Net.Sockets;
using XcoAppSpaces.Transport.Sockets.Auth.Contract;
using System.Net;

namespace XcoAppSpaces.Transport.Sockets.Auth
{
	class FinishAuthentication : IFinishAuthentication
	{
		public void In_Connection(ConnectionInfo conn)
		{
			//try
			//{
#if !SILVERLIGHT && !PocketPC //setting the timeout is not supported in compact framework
				conn.Stream.ReadTimeout = conn.OriginalStreamReadTimeout; //it should not be possible that an exception is thrown here because just the original value is restored
#endif
			Out_TcpClient(conn.Client);


			//}
			//catch
			//{
			//    Out_TcpClient(conn.Client);
			//}
		}

		public event TcpClientHandler Out_TcpClient;
	}
}
